package com.tang.model.builder;

import java.math.BigDecimal;

/**
 * @Author tangyuan2meicloud.com
 * @DATE 2021/8/16 7:10
 * @Desc
 * @Remarks
 */
public class TPhoneBuilder {
    private Long id;

    private String brand;

    private String type;

    private BigDecimal price;

    public TPhone build() {
        TPhone tPhone = new TPhone();
        tPhone.setId(id);
        tPhone.setBrand(brand);
        tPhone.setPrice(price);
        tPhone.setType(type);
        return tPhone;
    }

    public TPhoneBuilder setId(Long id) {
        this.id = id;
        return this;
    }

    public TPhoneBuilder setBrand(String brand) {
        this.brand = brand;
        return this;
    }

    public TPhoneBuilder setType(String type) {
        this.type = type;
        return this;
    }

    public TPhoneBuilder setPrice(BigDecimal price) {
        this.price = price;
        return this;
    }
}
